package com.atguigu.daijia.driver.service;

import com.atguigu.daijia.model.entity.driver.DriverInfo;
import com.atguigu.daijia.model.entity.driver.DriverSet;
import com.atguigu.daijia.model.form.driver.DriverFaceModelForm;
import com.atguigu.daijia.model.form.driver.UpdateDriverAuthInfoForm;
import com.atguigu.daijia.model.vo.driver.DriverAuthInfoVo;
import com.atguigu.daijia.model.vo.driver.DriverInfoVo;
import com.atguigu.daijia.model.vo.driver.DriverLoginVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author 谢忠涵7
 */
public interface DriverInfoService extends IService<DriverInfo> {

    /**
     * @description: 司机微信小程序登录
     * @author: xiaoxie
     * @date: 2024/10/24 18:53
     * @param: [code] 临时票据
     * @return: driverId 司机id
     **/
    Long login(String code);

    /**
     * @description: 根据司机id 封装司机登录信息 vo对象
     * @author: xiaoxie
     * @date: 2024/10/24 19:51
     * @param: [driverId] 司机id
     * @return: DriverLoginVo 司机登录信息 vo对象
     **/
    DriverLoginVo getDriverLoginInfo(Long driverId);

    /**
     * @description: 根据司机id 封装司机认证信息 vo对象
     * @author: xiaoxie
     * @date: 2024/10/24 19:51
     * @param: [driverId] 司机id
     * @return: DriverLoginVo 司机认证信息 vo对象
     **/
    DriverAuthInfoVo getDriverAuthInfo(Long driverId);
    /**
     * @description: 更新司机认证信息
     * @author: xiaoxie
     * @date: 2024/10/25 11:17
     * @param: [updateDriverAuthInfoForm] 更新的数据
     * @return: 是否更新成功
     **/
    Boolean updateDriverAuthInfo(UpdateDriverAuthInfoForm updateDriverAuthInfoForm);
    /**
     * @description: 创建司机人脸模型
     * @author: xiaoxie
     * @date: 2024/10/25 11:36
     * @param: [driverFaceModelForm] 司机人脸信息
     * @return: 是否创建成功
     **/
    Boolean creatDriverFaceModel(DriverFaceModelForm driverFaceModelForm);
    /**
     * @description: 根据司机id获取司机设置信息
     * @author: xiaoxie
     * @date: 2024/10/26 23:03
     * @param: [driverId] 司机id
     * @return: DriverSet 对象
     **/
    DriverSet getDriverSet(Long driverId);

    /**
     * @description: 查询是否进行过人脸识别
     * @author: xiaoxie
     * @date: 2024/10/28 10:40
     * @param: [driverId] 司机id
     * @return:
     **/
    Boolean isFaceRecognition(Long driverId);

    /**
     * @description: 通过腾讯云验证司机人脸是否正确
     * @author: xiaoxie
     * @date: 2024/10/28 10:48
     * @param: [driverFaceModelForm] 前端图片
     * @return: java.lang.Boolean
     **/
    Boolean verifyDriverFace(DriverFaceModelForm driverFaceModelForm);

    /**
     * @description: 更新司机接单状态
     * @author: xiaoxie
     * @date: 2024/10/28 10:59
     * @param: [driverId, status]
     * @return: java.lang.Boolean
     **/
    Boolean updateServiceStatus(Long driverId, Integer status);

    /**
     * @description: 获取司机基本信息
     * @author: xiaoxie
     * @date: 2024/10/29 14:48
     * @param: [driverId]
     * @return: DriverInfoVo
     **/
    DriverInfoVo getDriverInfo(Long driverId);

    /**
     * @description: 获取司机OpenId
     * @author: xiaoxie
     * @date: 2024/11/1 16:50
     * @param: [driverId]
     * @return: java.lang.String
     **/
    String getDriverOpenId(Long driverId);
}
